﻿<%@ Page Title="Source Page" Language="C#" MasterPageFile="~/NestedMasterPage.master" AutoEventWireup="true" CodeBehind="Source.aspx.cs" Inherits="CuaHangLego.Webform.Source" %>
<asp:Content ID="Content3" ContentPlaceHolderID="productPlace" runat="server">
    <h1>SOURCE PAGE</h1>

    <asp:TextBox ID="txtUsername" runat="server" />
    <asp:TextBox ID="txtAge" runat="server" TextMode="Number" />
    <asp:TextBox ID="txtEmail" runat="server" TextMode="Email" />
    <asp:TextBox ID="txtPassword1" runat="server" TextMode="Password" />
    <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" />
    <asp:TextBox ID="txtPhone" runat="server" />

    <asp:RequiredFieldValidator ID="req1" CssClass="ErrorMessage" ErrorMessage="You must type your name" runat="server" Text="*" ControlToValidate="txtUsername" SetFocusOnError="true" />
    <asp:RangeValidator runat="server" ControlToValidate="txtAge" MinimumValue="0" MaximumValue="100" ErrorMessage="Your age between 1 and 100" Text="*" Type="Integer" />
    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="Enter a valid e-mail address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
    <asp:CompareValidator runat="server" Operator="Equal" Type="String" ControlToValidate="txtPassword2" ControlToCompare="txtPassword1" Text="*" ErrorMessage="Re password not match" CssClass="ErrorMessage" />
    <asp:CustomValidator runat="server" ControlToValidate="txtPhone" ErrorMessage="You must provide 1 phone number at least" Text="*" OnServerValidate="Unnamed3_ServerValidate" />

    <asp:ValidationSummary DisplayMode="List" runat="server" HeaderText="Please Correct All Errors:" ShowMessageBox="True" ShowSummary="False" />

    <asp:Button ID="SubmitButton" runat="server"/>
    <asp:Button ID="GotoTagetPage" runat="server" Text="Go to target page" OnClick="GotoTagetPage_Click" />
    <asp:Button ID="ServerTranfer" runat="server" Text="Server Tranfer" OnClick="ServerTranfer_Click" />
</asp:Content>
